package com.bitantenna.messages;

import com.bitantenna.Message;

public class MessageStop extends Message {

	@Override
	public void fromBytes(byte[] input) {
		key(Message.paramFromPacket(input, 1));		
	}

	@Override
	public void toBytes(byte[] output) {		
		Message.paramFromPacket(output, 1, key());		
		Message.setMessageId(output, MessageIdStop);

	}
	
	public int key() {
		return key;
	}
	
	int key=0;
	public void key(int k) {
		key=k;		
	}

	@Override
	public int toByteSize() {
		return 2*4;
	}
}
